Method for minimizing denial of service attacks on network servers

ABSTRACT

A method for providing communications network security can include receiving a round-trip network latency for a client specifying an open port duration. A port can be opened to receive a request from the client. The port can be closed when an amount of time at least as great as the open port duration has passed since the opening of the port.

BACKGROUND OF THE INVENTION

[0001] 1. Technical Field

[0002] This invention relates to the field of network security, and more particularly, to defending against attacks on network servers.

[0003] 2. Description of the Related Art

[0004] Network security is a growing concern for operators of network servers, for example Internet servers. Computer hackers frequently attack network servers to cause disruption in network services as well as corrupt data. Notably, there are a myriad of possible ways a network server can be attacked. For example, computer hackers frequently use techniques to search for open ports through which the server can be attacked. Once an open port is found, hackers often attempt to circumvent the server's security in order to gain access to secure files.

[0005] Another method commonly used by computer hackers, known as a denial of service (DoS) attack, is to attack a server in order to tie up server resources so that the resources become unavailable to establish any new client connections. Accordingly, when valid clients attempt to connect to the server, the server responds by issuing denial of service responses.

[0006] One DoS attack technique, known as SYN flooding, exploits a connection establishment protocol commonly referred to as a three-way handshake. The client system begins the three-way handshake process by sending a synchronous (SYN) message to the server. A SYN message is a bit flag in a TCP header that when set indicates that synchronization is requested with a remote server. The server then acknowledges the SYN message by sending a synchronization acknowledgment (SYN-ACK) message to the client. The client then completes the connection by responding with an acknowledgment (ACK) message. Once the connection is open, service-specific data can be exchanged between the client and the server.

[0007] A half-open connection occurs when the server responds to a client by sending a SYN-ACK message, but never receives a responsive ACK message from the client. SYN flooding works by creating scores of half-open connections. This is commonly accomplished using a technique known as IP-spoofing, wherein an attacking client sends apparently legitimate SYN messages to a victim server. The SYN messages, however, are not legitimate in that the SYN messages reference other clients that are unable to respond to the SYN-ACK messages. Hence, the victim server never receives the ACK message completing the connection.

[0008] The data structure on the victim server for the half-open connections will eventually fill, rendering the server unable to accept any new incoming connections until the table is purged. Accordingly, legitimate clients attempting to connect to the victim server will receive the DoS response. Normally there is a timeout associated with a pending connection, so the half-open connections will eventually expire and the victim server system can recover. However, the attacking system can simply continue sending IP-spoofed packets requesting new connections faster than the pending connections expire, thereby causing the server to crash or to otherwise be rendered inoperative.

[0009] Methods currently exist to provide a measure of security against DoS attacks while still allowing client-server communications. These methods, however, are only moderately successful. One such method randomly changes the server port addresses through which a server and a client communicate, calculating each new port with a random number generator. Both the client and server use a copy of the same random number generator and share a random seed, which is a value that a random generator uses to start the random number generation process. Accordingly, the order in which random numbers are generated at both the server and client ends of the communication link remain synchronized. Hence, the client and server can each calculate the same sequence of port addresses used for changing ports.

[0010] One disadvantage of such port-jumping, security techniques, however, is determining the period which each port is to remain open prior to jumping to a new port. If a particular port address is open too long, a hacker may have enough time to scan the server, find the open port, and infiltrate the system through the open port. If a port address is not open long enough, the port may close before a packet sent by a client arrives, especially if there is a high network latency between the client and the server.

[0011] Network latency, which is a synonym for network delay, is an expression of how much time it takes for a packet of data to get from one designated point to another. The contributors to network latency include propagation, transmission, router, processing, and other computer and storage delays. Propagation delay is simply the time taken for a packet to travel between one place and another at the speed of light. Transmission delay is delay introduced by a transmission medium itself, for example, optical fiber, electrical wires, and other transmission mediums. Router and processing delays are caused by the time taken to examine and possibly change the header in a packet at each gateway node. Computer and storage delays occur at each end of network where a packet may be subject to storage and hard disk access delays. Notably, computer delays also can occur at intermediate devices such as switches and bridges.

[0012] Because latency results from multiple contributors, it is difficult to gauge how much latency will be associated with a given connection. Further, changing conditions of the network environment effect the various delay times. For example, network congestion can cause increased router and processing delays. The propagation and transmission delays can be affected if network congestion causes alternate transmission routes to be used for client-server communications. Moreover, computer and storage delays can be affected by increased server load which reduces available server resources. Hence, current security techniques commonly keep ports open for a relatively long period of time to insure that the ports are open long enough to receive all packets that are sent to the ports during high network latency periods. If the ports are close too quickly, packets can be blocked by a closed port and the client-server connection can be lost.

SUMMARY OF THE INVENTION

[0013] The invention disclosed herein provides a network security solution for minimizing denial of service (DoS) attacks on network servers. The present invention aids servers in eluding potential unauthorized users attempting to infiltrate a system through open ports. In particular, the present invention provides a solution for dynamically varying the timing of port openings and closings according to a latency value to optimize the time duration that ports are open. In doing so, the present invention accounts for changing conditions of the network environment, such as network congestion, server load, and other network conditions affecting network latency. Accordingly, the server ports are open long enough to receive packets sent to those ports by authorized clients, even when high network latency conditions exist, yet the ports are not held open for an unnecessarily long period of time. The risk of an unauthorized user scanning a server to find an open port which can be used to infiltrate the server is thereby reduced.

[0014] One aspect of the present invention can include a method of providing communications network security. The method can include receiving a round-trip latency from a client specifying an open port duration. Although the round-trip latency can specify a value, the round-trip latency also can specify a time the client sends a request and a time the client receives a response to the request such that the server can compute the open port duration. The open port duration can be scaled by a predetermined value. A port can be opened to receive a request from the client. The port can be closed when an amount of time at least as great as the open port duration has passed since the opening of the port.

[0015] Accordingly, a second port can be opened. The second port can be opened at a randomly generated port address. Notably, the open port duration can be replaced with a second open port duration. For example, a subsequent round-trip latency can be received and used to determine an updated open port duration. The updated open port duration can be provided to the client to synchronize the client and the server. The updated open port duration also can be scaled by a predetermined value.

[0016] Another aspect of the present invention can include a method of providing communications network security wherein a one-way latency is determined when receiving a packet from a client. The one-way latency can specify an open port duration. For example, a packet that is time stamped with a send time can be received from a client. A time that the packet is received can be noted. A difference between the send time and the receive time can be calculated. The open port duration can be scaled by a predetermined value.

[0017] The open port duration can be shared with the client and a port can be opened to receive a request from the client. The port can be closed when an amount of time at least as great as the open port duration has passed since the opening of the port. A second port can be opened when the port closes. The second port can be opened at a randomly generated port address. Notably, the open port duration can be replaced with a second open port duration. For example, a subsequent one-way latency can be determined which specifies an updated open port duration. The updated open port duration can be provided to the client to synchronize the client and the server. Still, the updated open port duration can be scaled by a predetermined value.

BRIEF DESCRIPTION OF THE DRAWINGS

[0018] There are shown in the drawings embodiments which are presently preferred, it being understood, however, that the invention is not limited to the precise arrangements and instrumentalities shown.

[0019]FIG. 1 is a flow chart showing a method for providing network security in accordance with the present invention.

[0020]FIG. 2 is a flow chart showing an alternate method for providing network security in accordance with the present invention.

DETAILED DESCRIPTION OF THE INVENTION

[0021] The invention disclosed herein provides a network security solution which can minimize denial of service (DoS) attacks on network servers and help servers elude potential unauthorized users attempting to infiltrate a system through open ports. In particular, the present invention provides a solution for providing network security while maintaining stable client-server network connections by randomly changing active port addresses and dynamically varying the timing of port openings and closings according to a latency value. The latency value optimizes the time duration that ports are open, accounting for changing conditions of the network environment, such as network congestion, server load, and other network conditions affecting network latency. Accordingly, the server ports are open long enough to receive packets sent to server ports by authorized clients, even when conditions of high network latency exist, yet the ports are not held open for an unnecessarily long period of time. The risk of an unauthorized user scanning a server to find an open port which can be used to infiltrate the server is thereby reduced.

[0022]FIG. 1 is a flow chart 100 that shows a method for providing network security in accordance with the present invention. The method can begin in a state wherein an agreement has been established between a client and a server regarding which port communication can be initiated as well as the time the port will be open to initiate client-server synchronization. In order to elude potential unauthorized users, the initial port where the client request is sent can be protected using known techniques to ensure that limited access to the port is provided. For example, in one arrangement using secure multi-purpose Internet mail extension (S/MIME), the client can send to the server an electronic message, such as an instant message or electronic mail, containing a secure authenticated request for the port information. The server can respond by sending an electronic message disclosing the port address and the port open time to the client, either in a single message or in separate messages for added security. Public and private keys can be used to securely code and decode the port information contained in the messages. Other methods can be used as well, for example using the services of a Certificate Authority to pass the initial port information, or using a physical token as a seed in a random number generator that determines an initial port. Nonetheless, many other security techniques can be used to securely provide the first port address. Accordingly, the examples disclosed herein should not be construed as a limitation of the present invention.

[0023] Referring to step 105, a server can receive a client request, for example a synchronous (SYN) message, wherein the client requests a connection with the server. Referring to step 110, the server can respond to the client request with a server acknowledgment, such as a synchronous acknowledgment (SYN-ACK) message. The server acknowledgment can include a random seed shared by the server that can be used in a random pattern generator to generate random port addresses. The random seed can be encrypted when sent, again using known encryption techniques. For example, the seed can be encrypted and decrypted using public and private keys as previously discussed, or using security systems built into standard Internet browsers. Notably, the server and the client each can use a copy of the same seed and a copy of the same random pattern generator to insure that the client and server generate the same sequence of random port addresses.

[0024] Referring to step 115, the client can measure the network latency between the client and the server. As defined herein, network latency is an expression of how much time it takes a packet of data to get from one designated point to another. In one arrangement, to determine the network latency, a client can note the time when a packet, such as a client request, is sent to a server. The client then can note the time a server acknowledgment is received in response to the packet. The client can utilize an internal clock to determine the send and receive times, but other methods can be used as well, for example an Internet time clock, a Global Positioning Satellite (GPS) time clock, and/or other time measuring devices. The round-trip network latency can be computed as the difference between the send time and the receive time.

[0025] The open port duration then can be derived from the round-trip latency. Notably, the open port duration should be long enough so that when the client sends a packet to a server port, the server port is still open when the packet arrives. Accordingly, the open port duration also can be computed by multiplying or scaling the measured round-trip network latency by some factor. Alternatively, the measured round-trip latency can be scaled by adding a predetermined time value. For example, although the open port duration may only need to be at least equal to the measured round-trip network latency, the round-trip latency can be scaled by a factor 1, 2, or 3. This can insure that a port is open long enough for a packet to be transmitted from the client to the server and for the server to receive the packet.

[0026] Referring to step 120, the network open port duration can be forwarded to the server with a client acknowledgment that completes the process establishing a connection between the client and server. Alternatively, the client can forward to the server the start and end times of the round-trip latency so that the server can compute the open port duration. The server can then share the open port duration with the client.

[0027] Referring to step 125, after a connection is established between the client and the server (i.e. client and server are synchronized), the initial port can be closed and a first port can be opened at a first random port address generated by the random pattern generator. Importantly, referring to decision block 130 and step 135, the network open port duration can be used to time port openings and closings so that the client and server remain synchronized until a communication session is complete. For example, the time a port is open can be monitored. When the port has been opened for an amount of time equal to the network open port duration, the port can be closed and a next port can be opened. In the case that a packet is still being received when a port times out, the port can be held open just long enough to finish receiving the packet. In order to keep synchronization between the client and the server, the timing for the next port can begin when the first port times out, even though the first port may be held open longer to complete a packet transfer. The next port also can be held open for an amount of time equal to the network open port duration, at which time it closes and a third port opens, and so on.

[0028] Network congestion and changing server loads often can cause variation in network latency times. Hence, network latency times can be monitored and the open port duration dynamically adjusted accordingly. In one arrangement, the network latency can be monitored each time a new packet is sent. In this instance, the network latency would be measured from the time a packet is sent until a response to the packet is received. The open port duration can be re-calculated with each new network latency measurement or when the network latency varies more than a predetermined percentage or amount.

[0029] In another arrangement, the network latency can be measured periodically. For example, the network latency can be measured from the time every fifth packet is sent until a response is received for that particular packet. Again, the open port duration can be re-calculated after each network latency measurement. In yet another arrangement, the network latency can be continuously or periodically measured using one of the above techniques, and an average network latency can be computed and used for determining the open port duration. For example, the average of every five network latency measurements can be used.

[0030] In consequence, the port openings and closings can be timed using a dynamically changing open port duration to keep the port openings and closings optimized for the network environment. For example, if the network becomes congested and network latencies begin to increase, a new open port duration can be computed and shared between the client and the server. Likewise, if network latency times show a trend that is decreasing, a new open port duration can again be computed to minimize the amount of time each port remains open, thereby reducing the chance of an unauthorized user finding and attacking an open port.

[0031]FIG. 2 is a flow chart 200 showing another embodiment of the present invention. Referring to step 205, the server can receive a client request to establish a server connection. In contrast to the arrangement previously discussed wherein the client measures network latency and determines a open port duration, in this embodiment the server can measure a one-way network latency and use the one-way network latency measurement to determine the open port duration, as shown in step 210.

[0032] To determine the one-way network latency, the client can time stamp a packet sent to the server, such as a client request, to indicate the time the packet was sent. For example, the client can time stamp a client request with Internet time, a time provided by a GPS network time clock, or some other centralized time source available over a network. The server then can note the time the client request was received. To insure accuracy, it is preferable that the server determine the receive time for the client request by the same method that the client determines the send time. The one-way network latency can be calculated as the difference between the send time and the receive time. The open port duration can then be computed by scaling the measured one-way network latency by some factor or adding a predetermined time value to the one-way network latency. For example, the open port duration can be computed to be at least twice the measured one-way network latency, or some other factor.

[0033] The server then can send the open port duration to the client along with the random seed in the server acknowledgment, as shown in step 215. Referring to step 220, the client can send the server a client acknowledgment indicating the server acknowledgment was received, at which time the server can open the connection. The initial port then can be closed and a first random port can be opened, as shown in step 225. Referring to decision block 230 and step 235, the open port duration can be used to time port openings and closings so that the client and server remain synchronized until a communication session is complete, as previously discussed.

[0034] As with the arrangement where the round-trip network latency is monitored to dynamically adjust the open port duration, the one-way network latency also can be monitored to optimize port openings and closings for particular network conditions. For example, the open port duration can be adjusted to account for network congestion, server load, and other circumstances that affect network latency.

[0035] In one arrangement, a client can time-stamp each packet sent to the server and the server can calculate the one-way network latency for each packet based on the difference between the time the server receives the packet and the time the packet was sent. Each new network latency measurement can be used to calculate a new open port duration or, as previously discussed, the network latency can be periodically monitored. Further, as also previously discussed, average network latencies can be monitored and used to re-calculate open port durations. Regardless, updated open port durations can be continually and/or periodically communicated to the client.

[0036] The present invention can be realized in hardware, software, or a combination of hardware and software. The present invention can be realized in a centralized fashion in one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system or other apparatus adapted for carrying out the methods described herein is suited. A typical combination of hardware and software can be a general purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein. The present invention also can be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which when loaded in a computer system is able to carry out these methods. Computer program in the present context means any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: a) conversion to another language, code or notation; b) reproduction in a different material form.

[0037] This invention can be embodied in other forms without departing from the spirit or essential attributes thereof. Accordingly, reference should be made to the following claims, rather than to the foregoing specification, as indicating the scope of the invention. 

What is claimed is:
 1. A method of providing communications network security, comprising: receiving a round-trip latency from a client specifying an open port duration; opening a port to receive a request from said client; and closing said port when an amount of time at least as great as said open port duration has passed since said opening of said port.
 2. The method of claim 1, further comprising: scaling said open port duration by a predetermined value.
 3. The method of claim 1, wherein said round-trip latency specifies a time said client sends a request and a time said client receives a response to said request such that said server computes said round-trip latency.
 4. The method of claim 1, further comprising: opening a second port when said port closes.
 5. The method of claim 4, wherein said second port is opened at a randomly generated port address.
 6. The method of claim 1, further comprising: replacing said open port duration with a second open port duration.
 7. The method of claim 1, further comprising: receiving a subsequent round-trip latency to determine an updated open port duration; and providing said updated open port duration to said client to synchronize said client and said server.
 8. The method of claim 7, further comprising: scaling said updated open port duration by a predetermined value.
 9. A method of providing communications network security, comprising: determining a one-way latency when receiving a packet from a client, said one-way network latency specifying an open port duration; sharing said open port duration with said client; opening a port to receive a request from said client; and closing said port when an amount of time at least as great as said open port duration has passed since said opening of said port.
 10. The method of claim 9, further comprising: scaling said open port duration by a predetermined value.
 11. The method of claim 9, said step of determining a one-way latency comprising: receiving from a client a packet that is time stamped with a send time; noting a receive time when said packet is received; and calculating a difference between said send time and said receive time.
 12. The method of claim 9, further comprising the step: opening a second port when said port closes.
 13. The method of claim 12, wherein said second port is opened at a randomly generated port address.
 14. The method of claim 9, further comprising the step: replacing said open port duration with a second open port duration.
 15. The method of claim 9, further comprising: determining a subsequent one-way latency specifying an updated open port duration; and providing said updated open port duration to said client to synchronize said client and said server.
 16. The method of claim 15, further comprising: scaling said updated open port duration by a predetermined value.
 17. A machine-readable storage, having stored thereon a computer program having a plurality of code sections executable by a machine for causing the machine to perform the steps of: receiving a round-trip latency from a client specifying an open port duration; opening a port to receive a request from said client; and closing said port when an amount of time at least as great as said open port duration has passed since said opening of said port.
 18. The machine-readable storage of claim 17, further comprising: scaling said open port duration by a predetermined value.
 19. The machine-readable storage of claim 17, wherein said round-trip latency specifies a time said client sends a request and a time said client receives a response to said request such that said server computes said open port duration.
 20. The machine-readable storage of claim 17, further comprising: opening a second port when said port closes.
 21. The machine-readable storage of claim 20, wherein said second port is opened at a randomly generated port address.
 22. The machine-readable storage of claim 17, further comprising: replacing said open port duration with a second open port duration.
 23. The machine-readable storage of claim 17, further comprising: receiving a subsequent round-trip latency to determine an updated open port duration; and providing said updated open port duration to said client to synchronize said client and said server.
 24. The machine-readable storage of claim 23, further comprising: scaling said updated open port duration by a predetermined value.
 25. A machine-readable storage, having stored thereon a computer program having a plurality of code sections executable by a machine for causing the machine to perform the steps of: determining a one-way latency when receiving a packet from a client, said one-way network latency specifying an open port duration; sharing said open port duration with said client; opening a port to receive a request from said client; and closing said port when an amount of time at least as great as said open port duration has passed since said opening of said port.
 26. The machine-readable storage of claim 25, further comprising: scaling said open port duration by a predetermined value.
 27. The machine-readable storage of claim 25, said step of determining a one-way latency comprising: receiving from a client a packet that is time stamped with a send time; noting a receive time when said packet is received; and calculating a difference between said send time and said receive time.
 28. The machine-readable storage of claim 25, further comprising the step: opening a second port when said port closes.
 29. The machine-readable storage of claim 28, wherein said second port is opened at a randomly generated port address.
 30. The machine-readable storage of claim 25, further comprising the step: replacing said open port duration with a second open port duration.
 31. The machine-readable storage of claim 25, further comprising: determining a subsequent one-way latency specifying an updated open port duration; and providing said updated open port duration to said client to synchronize said client and said server.
 32. The machine-readable storage of claim 31, further comprising: scaling said updated open port duration by a predetermined value. 